package com.demo2do.jit.remote.api;

import com.demo2do.jit.remote.Result;

import java.math.BigDecimal;

import retrofit2.Response;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Header;
import retrofit2.http.POST;
import rx.Observable;

/**
 * Created by wilson on 16/6/10.
 */
public interface JitApi {

    @FormUrlEncoded
    @POST("/test/public/pdaservice/login")
    Observable<Response<Result>> login(@Field("username") String username, @Field("password") String password, @Field("scanid") String scanid);

    @FormUrlEncoded
    @POST("/test/public/pdaservice/pdasearch")
    Observable<Response<Result>> search(@Field("driver_card") String driverCard, @Header("Cookie") String cookie);

    @FormUrlEncoded
    @POST("/test/public/pdaservice/pdacharge")
    Observable<Response<Result>> charge(@Field("driver_card") String driverCard, @Field("num") BigDecimal num, @Header("Cookie") String cookie);

    @POST("/test/public/pdaservice/logout")
    Observable<Response<Result>> logout();

}
